home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / smfd.h.z / smfd.h
C/C++ Source or Header  |  1992-04-03  |  3KB  |  77 lines

  1. /**************************************************************************
  2.  *                                      *
  3.  *          Copyright (C) 1986, Silicon Graphics, Inc.          *
  4.  *                                      *
  5.  *  These coded instructions, statements, and computer programs  contain  *
  6.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  7.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  8.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  9.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  10.  *                                      *
  11.  **************************************************************************/
  12.  
  13. /*    This is the header file for the driver for the Scientific Micro
  14.     Systems SCSI floppy.  Many structures are shared with dksc.h so
  15.     so that programs won't have to be changed.  Some fields will
  16.     obviously be ignored.
  17.     Driver first created by Dave Olson, 6/88.
  18. */
  19. #ident "$Revision: 1.13 $"
  20.  
  21.  
  22. /* SCSI disk minor # breakdown (for floppies, we use partition
  23.  * to indicate type of floppy; partitions aren't supported).
  24.  *
  25.  *      7     6    5          4              3     2     1     0
  26.  *    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  27.  *    +               +                  +                       +
  28.  *    +  Target  ID   +  Logical unit #  +      Partition        +
  29.  *    +               +                  +     (floppy type)     +
  30.  *    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  31. */
  32.  
  33. #define _SMFDIOC_(x)    (('f'<<8) | x)
  34.  
  35. /* values returned by smfd_type(), used for table indices, etc */
  36. #define FD_FLOP 0    /* 360K (48tpi) */
  37. #define FD_FLOP_DB 1    /* 720K (96tpi,9sec/trk) */
  38. #define FD_FLOP_AT 2    /* 1.2M (96tpi,15sec/trk) (PC-AT) */
  39. #define FD_FLOP_35LO 4    /* 'low density' 3.5" floppy (720K) */
  40. #define FD_FLOP_35 5    /* 'high density' 3.5" floppy (1.44 Mb) (*/
  41.  
  42. #define SMFD_MAX_TYPES 6    /* use minor # to indicate type */
  43. #define SMFD_TYPE_MASK 0xf
  44.  
  45. #define    smfd_type(minor)    (minor & SMFD_TYPE_MASK)
  46.  
  47. #define MAXFLOPS 1    /* number of floppy drives supported */
  48.  
  49. #define SMFDSETMODE    _SMFDIOC_(0)    /* set spt, cyls, tpi, etc */
  50. #define SMFDREQSENSE    _SMFDIOC_(1)    /* return last sense key */
  51. #define SMFDRECAL    _SMFDIOC_(2)    /* do a recal on the drive */
  52. #define SMFDEJECT    _SMFDIOC_(3)    /* eject floppy disk, return EINVAL */
  53.                     /* if software eject not supported */
  54. #define SMFDMEDIA    _SMFDIOC_(4)    /* return media status */
  55.                     /* ioctl(smfd, SMFDMEDIA, int *) */
  56. #define    SMFDMEDIA_READY        (1 << 0)    /* media in drive */
  57. #define    SMFDMEDIA_CHANGED    (1 << 1)    /* media changed */
  58. #define    SMFDMEDIA_WRITE_PROT    (1 << 2)    /* media is write protected */
  59.  
  60. #define    SMFDNORETRY    _SMFDIOC_(5)    /* no retry on reset/media change during
  61.                        read/write */
  62.  
  63. struct smfd_setup { /* structure for SMFDSETMODE.  Values of 0 use
  64.     current values. */
  65.     int secsize;    /* bytes per sector, between 128 and 4096
  66.             (inclusive) in powers of 2 */
  67.     int sectrk;    /* typically 8 or 9 for 512, 4 or 5 for 1024 byte
  68.             sectors */
  69.     int    density;    /* MFM/FM.  No way to set with mode select... */
  70.     int tpi;    /* tpi, only 48 and 96 are supported */
  71.     int cyls;    /* cylinders on drive */
  72.     int heads;    /* 1 or 2 */
  73.     int headsettle;    /* ms */
  74.     int    motorondelay;    /* 1/10's of seconds */
  75.     int    motoroffdelay;    /* 1/10's of seconds */
  76. };
  77.